﻿#region Copyright
/// <copyright company="CSZI.com">
/// ------------------------------------------------------------------------------
/// Copyright (c) 2002-2010 Chaos Studio.  All rights reserved.
/// Contact   :   MSN:zhouyu@cszi.com , QQ:478779122 .
/// Link         :   http://www.CSZI.com , http://www.69sea.com
/// Author     :   zhouyu(周宇)
/// ------------------------------------------------------------------------------
/// </copyright>
#endregion

using CS.TaskScheduling;


namespace CS.Task.DataTransfer
{
    /// <summary>
    /// 数据导入器
    /// </summary>
    ///
    /// <description class = "CS.Task.DataTransfer.DataImporter">  
    /// </description> 
    ///
    /// <history>
    /// Create      :	atwind , 2010-5-31 19:06:42 ;
    ///  </history>
    public class DataImporter : TaskProvider
    {


        /// <summary>
        /// 取得要导入的源数据
        /// </summary>
        /// <returns></returns>
        public object FetchData()
        {

            return null;
        }

        /// <summary>
        /// 导入数据
        /// </summary>
        /// <param name="sourceData">将被导入的数据</param>
        /// <returns>导入的条数</returns>
        public int ImportData(object  sourceData)
        {

            return 0;
        }

        /// <summary>
        /// 数据备份
        /// </summary>
        /// <param name="sourceData">将被备份的数据</param>
        /// <returns></returns>
        public bool BackupData(object sourceData)
        {

            return false;
        }





        #region TaskProvider 的实现

        /// <summary>
        /// 任务入口
        /// </summary>
        /// <returns></returns>
        protected override Result Work()
        {
            var rst = new Result();



            return rst;
        }

        /// <summary>
        /// 载入默认的公共资源
        /// </summary>
        public override void InitExtend()
        {
            base.InitExtend();
        }

        #endregion


    }
}
